Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本PR为微信小程序SDK添加了完整的客服管理功能,解决了 #3678 中提到的问题。
问题
小程序模块(
weixin-java-miniapp)缺少客服管理接口。虽然已有:WxMaCustomserviceWorkService用于企业微信绑定WxMaMsgService.sendKefuMsg()用于发送客服消息但缺少MP模块(
WxMpKefuService)中提供的核心客服管理功能,如账号管理和会话控制。解决方案
新增
WxMaKefuService接口及其实现,提供以下功能:客服账号管理
kfList()- 获取客服账号列表kfAccountAdd()- 添加客服账号kfAccountUpdate()- 更新客服账号kfAccountDel()- 删除客服账号会话管理
kfSessionCreate()- 创建客服会话kfSessionClose()- 关闭客服会话kfSessionGet()- 获取客户会话状态kfSessionList()- 获取客服会话列表使用示例
实现细节
WxMaKefuService,包含所有客服管理方法WxMaKefuServiceImpl,具有完善的错误处理和API集成WxMaService架构中验证
本实现提供了缺失的客服管理功能,同时保持与现有代码的兼容性,并遵循代码库中的既有模式。
修复 #3678。
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.